Amount-of-compressed data control method and image data compressing apparatus

ABSTRACT

An amount-of-compressed-data control method applicable to image data compression processing for compressing an amount of data is disclosed. The method includes the steps of: performing quantization by: dividing one digital image into multiple blocks each having n×n pixels; performing orthogonal transform on each block; and dividing n×n conversion coefficients resulting from the conversion by each threshold value of a quantization matrix including n×n threshold values each resulting from the multiplication of a predetermined coefficient S (where S is a positive real number); and variable-length encoding the quantized data. In this method, the value of the coefficient S allows the amount of compressed data to fit within a predetermined range of a target amount of data by performing the quantization and encoding by dividing the interval that the coefficient S can take on into multiple intervals and calculating the estimated value of the coefficient S based on the relationship between the amount of compressed image data and the coefficient S, which is defined for each of the divided intervals.

CROSS REFERENCES TO RELATED APPLICATIONS

The present invention contains subject matter related to Japanese PatentApplications JP 2006-327159 filed in the Japanese Patent Office on Dec.4, 2006, the entire contents of which being incorporated herein byreference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an amount-of-data control method forcontrolling the compression rate such that the amount of compressed datacan be equal to a target amount of data in a case where still image datais to be compressed and transmitted or recorded and to an image datacompressing apparatus applying the amount-of-data control.

2. Description of the Related Art

Various standardization methods such as JPEG have been proposed forstandardization of still image encoding.

FIG. 6 is a schematic diagram showing processing steps of JPEG. Thesystem divides one input image into multiple blocks each having 8×8pixels, performs two-dimensional discrete cosine transform (DCT) on eachof the blocks (step P1) and performs quantization by dividing theresulting DCT coefficient by each threshold of the quantization matrixincluding 8×8 thresholds (step P2).

FIGS. 7 and 8 are examples of the quantization matrices for intensitysignals and color-difference signals.

A difference is obtained between the direct current (DC) component ofthe quantized DCT coefficient and the DC component quantized in theprevious block, and Huffman encoding is performed on the number of bitsof the difference. Zigzag scan is performed on the alternate current(AC) component within each of the blocks to convert to a one-dimensionalprogression, and two-dimensional Huffman encoding is performed thereonwith the number of bits of the valid coefficient and the number ofserial zeros (invalid coefficient) (steps P3 and P4). FIG. 9 shows atable of the zigzag scan.

Notably, in the quantization in step P2, each threshold value of thequantization matrix is multiplexed by a certain coefficient (scalefactor) and is then divided by a DCT coefficient. The scale factor is avalue expressed by “2^S” (where S=0, ±1, ±2 . . . , and ^ is a power).The multiplication of each threshold value of the quantization matrix by2^S is equivalent to the bit shift of the data of each threshold value.The image quality and compression rate of a compressed image may beadjusted by the scale factor.

The thus compressed data is expanded by the reverse steps of steps P1 toP4. In other words, Huffman decoding in step P5, the decoding of the DCcomponent and AC component in step P6, the inverse quantization in stepP7 and the inverse DCT (IDCT) in step P8 are performed.

By the way, since this system uses Huffman codes, which are variablelength codes, for data compression, it is difficult to know the entireamount of compressed data until the end of the compression process(steps P1 to P4). Therefore, some control over the amount of data isdesirable for encoding within a predetermined range of amounts of data.In the past, multiple kinds of scale factor are used for compression,and the amount of compressed data is measured for each case, and therelationships between the scale factors and the amounts of compresseddata are obtained. Then, the scale factor corresponding to a givenamount of compressed data is inferred from analogy, and data compressionis performed with the scale factor by analogy.

Based on measurement results on many images, the relationship between anamount of compressed data and a scale factor is verified as:[Amount of Data]=A·log [Scale Factor]+B(where A and B: constants determined by a measurement point)

Therefore, A and B are obtained from a measurement result, and the scalefactor to the target amount of compressed data can be estimatedtherefrom (refer to JP-A-3-224362 (Patent Document 1)).

SUMMARY OF THE INVENTION

By the way, the amount-of-data control method has a problem in recordingcompressed data to a recording medium or transmitting compressed datathrough a communication path that the compressed data to be recordeddoes not fit into a predetermined storage area or may not be transmittedin a predetermined transmission band if the amount of data based on theestimated scale factor has a plus error in a case where the amount ofdata is larger or smaller than planned. Conversely, it is difficult toestimate the recording time and/or transmission time if the error isminus and large though no problems may occur regarding the recordingarea and/or transmission band.

Further increases of the error in amount of data may occur since it isdifficult for a compressor having a characteristic not expressible by asingle relational expression to estimate an optimum scale factor thoughthe processing above uses a single relational expression to estimate ascale factor.

The scale factor varies since the amount of data with an estimated scalefactor may increase or decrease every time the data is compressed evenin a case where one same image is continuously compressed as in astill-image serial recording device or a still image serial transmitter,which is used in the processing above, where images are seriallycompressed. As a result, the amount of data varies, which preventsstable image quality.

Accordingly, it is desirable to provide control over an amount ofcompressed data such that the amount of compressed data can be securelywithin a predetermined range of a target amount of data.

The invention is applicable to image data compression processingperforming quantization by dividing one digital image into multipleblocks each having n×n pixels, performing discrete cosine transform oneach block, and dividing n×n conversion coefficients resulting from theconversion by each threshold value of a quantization matrix includingn×n threshold values each resulting from the multiplication of apredetermined coefficient S (where S is a positive real number) andvariable-length encoding the quantized data.

The processing allows the amount of compressed data to fit within apredetermined range by performing the quantization and encoding bydefining a specific value as the coefficient S, obtaining a newcoefficient S by predetermined processing based on the amount ofcompressed data obtained therewith, performing quantization and encodingagain, repeating these steps until the amount of compressed data fitswithin the predetermined range.

Alternatively, quantization and encoding may be performed by defining aspecific value as the coefficient S, and a new coefficient S may beobtained by predetermined processing based on the amount of compresseddata obtained therewith. Then, quantization and encoding may beperformed by applying the coefficient S to the image to be compressednext such that the amount of compressed data of the next and subsequentimages can fit within a predetermined range.

The predetermined processing here is assumed as including defining arelational expression between the amount of compressed data and a scalefactor for each of multiple intervals of the scale factor, andestimating the scale factor.

Alternatively, the predetermined processing can correct the estimationerror of the scale factor by defining the relational expression betweenthe amount of compressed data and the scale factor along with an arraythat corrects the amount of compressed data corresponding to each valueof the scale factor.

Alternatively, the predetermined processing may minimize the variationof the amount of data by using, for quantization, the scale factor witha variation minimized by smoothing in time the estimated values of thescale factor obtained from the relationship between the amount ofcompressed data and the scale factor.

Thus, the amount of compressed data can securely fit within apredetermined range, which prevents the problem that the amount ofcompressed data does not fit within a planned recording area ortransmission band. The recording time and/or transmission time can alsobe estimated easily. The image quality after compression is alsostabilized.

According to embodiments of the invention, the value of a scale factoris adjusted by using the relationship between an amount of compresseddata and the scale factor, which is defined for each of multipleIntervals of the scale factor. Thus, a more proper scale factor can beestimated than that of the case using a single relationship, and theamount of compressed data can fit within a predetermined range of atarget amount of data.

According to embodiments of the invention, since means for correcting ascale factor is provided, a proper scale factor can be estimated, andthe amount of compressed data can fit within a predetermined range of atarget amount of data.

According to embodiments of the invention, since means for smoothingscale factors, the variation of the scale factor is minimized, and theamount of compressed data can fit within a predetermined range of atarget amount of data.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a processing example of control overan amount of compressed data according to a first embodiment of theinvention;

FIG. 2 is a flowchart for describing the operation in FIG. 1;

FIG. 3 is an explanatory diagram illustrating the relationship between ascale factor and an amount of compressed data;

FIG. 4 is a flowchart describing a variation example of the operation inFIG. 1;

FIG. 5 is an explanatory diagram illustrating the relationship between ascale factor and an amount of compressed data according to a secondembodiment of the invention;

FIG. 6 is a block diagram showing a processing example ofcompression/expansion processing in the past;

FIG. 7 is an explanatory diagram showing a quantization matrix ofintensity signals;

FIG. 8 is an explanatory diagram showing a quantization matrix ofcolor-difference signals; and

FIG. 9 is an explanatory diagram showing a table of zigzag scan.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

With reference to FIGS. 1 to 4, a first embodiment of the invention willbe described below.

FIG. 1 is a schematic diagram showing a configuration example ofprocessing steps applying the control over an amount of compressed dataaccording to a first embodiment. In the description, the same referencenumerals are given to the same components as those in FIG. 6, which havebeen described in the example in the past.

First of all, input image data is divided into multiple blocks eachhaving n×n pixels such as 8×8 pixels horizontally and vertically, andtwo dimensional discrete cosine transform (DCT) is performed on each ofthe blocks (process P1).

The DCT is a kind of orthogonal transform in a frequency region and isdefined by:

$\begin{matrix}{{F\left( {u,v} \right)} = {\frac{4{C(u)}{C(v)}}{n \cdot n}{\sum\limits_{i = 0}^{n - 1}{\sum\limits_{j = 0}^{n - 1}{{f\left( {i,j} \right)} \times \cos\;\frac{\left( {{2i} + 1} \right)u\;\pi}{2n}\cos\;\frac{\left( {{2j} + 1} \right)v\;\pi}{2n}}}}}} & \left( {{Expression}\mspace{14mu} 1} \right)\end{matrix}$where the conversion coefficient is F(u,v), and the input image data ofeach one block is f(i,j).

${{In}\mspace{14mu}{this}\mspace{14mu}{case}},\begin{matrix}{{C(w)} = {{1/\left. \sqrt{}2 \right.}\left( {w = 0} \right)}} \\{= {1{\left( {w \neq 0} \right).}}}\end{matrix}$

The obtained conversion coefficient F(u,v) indicates the componentresulting from the decomposition of input image data of each one blockinto spatial frequencies.

The conversion coefficient F(0,0) indicates the value (DC component)proportional to the average value of the n×n pixels of input image dataf(i,j). F(u,v) exhibits a component (AC component) having a spatialfrequency increasing as u and/or v increase/increases.

The quantization is performed by dividing the thus obtainedtwo-dimensional DCT coefficient by the value resulting from themultiplication of each threshold value of a quantization matrixincluding n×n threshold values by a scale factor S (process P2). Themultiplication processing on each threshold value of a quantizationmatrix by a scale factor S is equivalent to the expansion/contract ofeach threshold value of the quantization matrix, and theincrease/decrease in amount of compressed data can be adjusted by thescale factor.

Next, for the DC component, a difference is obtained between thequantized conversion coefficient F′ (u,v) and the DC component quantizedon the previous block (process P3). Then, Huffman encoding is performedon the number of bits of the difference (process P4). The AC componentis zigzag scanned in the order shown in FIG. 9 and is converted to aone-dimensional progression. Then, the run-length encoding is performedthereon for compressing the number of serial zero data (process P3), andtwo-dimensional Huffman encoding is performed thereon with run-lengthencoded data of the number of serial zero data and the data of thenumber of bits of the valid coefficient (process P4).

Huffman encoding is performed on the number of bits for expressing avalue where the Huffman encoding does not use the DC component and theAC component and the quantized coefficients directly. Then, the value ofthe number of bits is added as added information separately from theHuffman codes. For example, a quantized coefficient 2 (in base 10) isexpressed as “000 . . . 010” in base 2. The number of bits 2 forexpressing this is Huffman encoded as a representative value, and thedata of 2 bits “10” is added as added bits.

On the other hand, the data resulting from the subtraction of “1” fromthe added bits is added if the quantized coefficient is negative. Forexample, if the quantized coefficient is −2 (in base 10) and isexpressed as “111 . . . 110” in base 2 (which is a complement number oftwo), the last two bits are added bits. Then, “01” resulting from thesubtraction of “1” from “10” is added as the added bits. Thus, the addedbits start with “1” if the quantized coefficient is positive and with“0” if negative, which allows easy determination of positive ornegative.

Next, after measuring the amount of compressed data and obtaining a newcoefficient S based on a predetermined method, quantization and encodingare performed thereon again. These processes are repeated until theamount of compressed data fits within a predetermined range such thatthe amount of compressed data can fit with in a predetermined range.Alternatively, after measuring the amount of compressed data andobtaining a new coefficient S based on a predetermined method,quantization and encoding may be performed by applying the coefficient Sto the image to be compressed next such that the amount of compresseddata of the next and subsequent images can fit within a predeterminedrange (process P10).

Describing the operation of the predetermined method with reference tothe flowchart in FIG. 2, the value of a specific value S0 is defined asthe scale factor S (step T1), and data compression processing inprocesses P2 to P4 is performed (step T2). The value S0 may be any valuewithin the range that the scale factor can take on, as shown in FIG. 3.

Next, whether the amount of data compressed with the selected value S0is within a predetermined range of the target amount of data V (stepT3), and processing ends if within the predetermined range of the amountof data V. If not, the value of the scale factor allowing the amount ofcompressed data V to fit within the predetermined range is calculatedbased on the relationship between the scale factor divided into multipleintervals and the amounts of compressed data, as shown in FIG. 3, (stepT4), and the data compression processing in the processes P2 to P4 isperformed again (step T2). Then, whether the amount of compressed datais within the predetermined range of the amount of data V or not isdetermined again (step T3). The processing in steps T2 to T4 isrepeated, and the processing ends if the amount of compressed data fitswith in a predetermined range of the target amount of data V.

Alternatively, as shown in the flowchart in FIG. 4, the value of thescale factor allowing the amount of compressed data V to fit within apredetermined range may be calculated from the relationship between thescale factor divided into multiple intervals and the amount ofcompressed data, as shown in FIG. 3, (step T4) and the processing mayend, without determining whether the amount of the compressed data fitswithin the predetermined range of the amount of data V or not. In thiscase, the value of the thus obtained may be used as the S0 in step T1for the compression of the next image.

The calculation of the “S” in step T4 may include dividing each of thescale factors for various sample images into multiple intervals, findingthe relationships between the scale factors and the amount of compresseddata in advance, and calculating the value of the scale factor amongthem that allows the amount of compressed data to fit within apredetermined range of the amount of data V by setting the scale factor,as shown in FIG. 3. For example, the relationship between the amount ofcompressed data and the scale factor may be defined by three relationalexpressions of:[Amount of Data]=B0/[Scale Factor]  (Expression 2)for Interval 1;[Amount of Data]=√(B1/[Scale Factor])   (Expression 3)for Interval 2; and[Amount of Data]=A·log [Scale Factor]+B2   (Expression 4)for Interval 3,(where A, B0, B1 and B2: constants determined by measurement points, and“log” indicates the logarithm in base 2). The equation for calculatingthe scale factor to a target amount of compressed data is given by:[Scale Factor]=(B0/[Target Amount of Data])   (Expression 5)for Interval 1;[Scale Factor]=B1/([Target Amount of Data]^2)   (Expression 6)for Interval 2; and[Scale Factor]=2^{([Target Amount of Data]−B2)/A}  (Expression 7)for Interval 3,(where A, B0, B1 and B2: constants determined by measurement points, andx^y indicates x raised to the yth power).

With reference to FIG. 5, for example, a second embodiment of theinvention will be described next. The basic outline of the processing inthe second embodiment is the same as that of the first embodiment but isdifferent in that the value of a scale factor S is defined as a specificvalue S0 first (step T1), and the data compression processing inprocesses P2 to P4 is performed (step T2), describing with reference tothe flowchart in FIG. 2, for example. The value S0 may be any valuewithin a range the scale factor can take on, as shown in FIG. 5.

Next, whether the selected value S0 allows the amount of compressed datawithin a predetermined range of target amount of data V or not isdetermined (step T3), and the processing ends if so. If not, the valueof the scale factor allowing the amount of compressed data V within thepredetermined range is calculated from the relationship between thescale factor and the amount of compressed data and the conversion arrayfor the correction, as shown in FIG. 5 (step T4). Then, the datacompression processing in processes P2 to P4 is performed again (stepT2), and whether the amount of compressed data fits within thepredetermined amount of data V or not is determined again (step T3). Theprocessing in steps T2 to T4 is repeated in this way, and the processingends when the amount of compressed data fits within the predeterminedrange of the target amount of data V.

Alternatively, the value of the scale factor allowing the amount ofcompressed data V within a predetermined range may be calculated fromthe relationship between the scale factor divided into multipleintervals and the amount of compressed data, as shown in FIG. 5, and aconversion array for the correction (step T4), and the processing mayend, without determining whether the amount of compressed data fitswithin a predetermined range of the amount of data V or not, as shown inFIG. 4. In this case, the thus obtained value of the scale factor isused as S0 in step T1 for compressing the next image.

The calculation of the “S” in step T4 may include finding therelationships between the scale factors and the amount of compresseddata, as shown in FIG. 5, and obtaining a coefficient for correcting thescale factor in advance, and calculating the value of the scale factoramong them that allows the amount of compressed data to fit within apredetermined range of the amount of data V by setting the scale factor.For example, the relationship between the amount of compressed data andthe scale factor may be defined as:[Amount of Data]=√(B1/[Scale Factor])   (Expression 8)(where B1: a constant determined by a measurement point). The equationfor calculating the scale factor to a target amount of compressed datais given by:[Provisional Scale Factor]=(B1/[Target Amount of Data]^2)   (Expression9);and[Scale Factor]=F[Provisional Scale Factor]  (Expression 10)(where B1: a constant determined by a measurement point, x^y indicates xraised to the yth power, and F is a conversion array that corrects thescale factor). In the conversion array, the provisional scale factorbefore the conversion is substituted into the subscript in the arraywithin [ ], and the converted scale factor is obtained.

In order to adjust the amount of compressed data to V, the provisionalscale factor S′ is calculated which is on a straight extension of therelationship between the current scale factor S0 and the amount ofcompressed data, as shown in FIG. 5. The scale factor S can be obtainedfrom F[S′] resulting from the substitution of the S′ into the subscriptof the conversion array, which has been found and created in advance.Then, in order to estimate the next scale factor from the scale factor,the inverse conversion is performed thereon to return to S′, and thenext provisional scale factor is obtained along the straight line. Theobtained provisional scale factor is converted with the array F, and theresult is handled as the next scale factor.

Next, a third embodiment of the invention will be described. The outlineof this embodiment is the same as that of the first embodiment but isdifferent in that a specific value S0 first is defined as the value of ascale factor S (step T1), and the data compression processing in stepsP2 to P4 is performed (step T2), describing with reference to theflowchart in FIG. 2, for example. The value S0 may be any value within arange the scale factor can take on.

Next, whether the selected value S0 allows the amount of compressed datawithin a predetermined range of target amount of data V or not isdetermined (step T3), and processing ends if so. If not, the value ofthe scale factor allowing the amount of compressed data V within thepredetermined range is calculated from the relationship between thescale factor and the amount of compressed data (step T4). Then, the datacompression processing in processes P2 to P4 is performed again (stepT2), and whether the amount of compressed data fits within thepredetermined amount of data V or not is determined again (step T3). Theprocessing in steps T2 to T4 is repeated in this way, and the processingends when the amount of compressed data fits within the predeterminedrange of the target amount of data V.

Alternatively, the value of the scale factor allowing the amount ofcompressed data V within a predetermined range may be calculated fromthe relationship between the scale factor and the amount of compresseddata (step T4), and the processing may end, without determining whetherthe amount of compressed data fits within a predetermined range of theamount of data V or not, as shown in FIG. 4. In this case, the thusobtained value of the scale factor is used as S0 in step T1 forcompressing the next image.

The calculation of the “S” in step T4 may include finding therelationships between the scale factors and the amount of compresseddata for various sample images in advance and calculating the value ofthe scale factor among them that allows the amount of compressed data tofit within a predetermined range of the amount of data V by setting thescale factor. For example, the relationship between the amount ofcompressed data and the scale factor may be defined as:[Amount of Data]=√(B1/[Scale Factor])   (Expression 11)(where B1: a constant determined by a measurement point). The equationsfor calculating the scale factor to a target amount of compressed dataare:[Provisional Scale Factor]=(B1/[Target Amount of Data]^2)   (Expression12)(where B1: a constant determined by a measurement point, and x^yindicates x raised to the yth power); and

$\begin{matrix}{\left\lbrack {{Scale}\mspace{14mu}{Factor}} \right\rbrack = {{r \cdot \left\lbrack {{Scale}\mspace{14mu}{Factor}\mspace{14mu}{Used}\mspace{14mu}{For}\mspace{14mu}{Previous}\mspace{14mu}{Compression}} \right\rbrack} + {\left( {1 - r} \right) \cdot \left\lbrack {{Provisional}\mspace{14mu}{Scale}\mspace{14mu}{Factor}} \right\rbrack}}} & \left( {{Expression}\mspace{14mu} 13} \right)\end{matrix}$(where r: Attenuation Coefficient 0≦r≦1)

In this case, the attenuation coefficient r may be a predetermined fixedvalue or may be changed every time the compression operation isperformed. For example, by defining that r increases as the distancebetween the scale factor used for the previous compression and theprovisional scale factor decreases and decreases as the distanceincreases, the variation of the scale factor can be minimized uponconvergence, and, at the same time, quick response can be provided for alonger distance.

In the three embodiments, the obtained value of the scale factor is usedas the scale factor for the compression on the next image, withoutdetermining whether the amount of compressed data fits within apredetermined range of the amount of data V, as shown in FIG. 4. This isbecause obtaining the predetermined amount of data from the next andsubsequent images can reduce the load on the processing ability andallows the amount of data to fit within the predetermined range of thetarget amount of data statically, though a still image serial recordingapparatus or still image serial transmitter that performs datacompression serially in real time may need to use a compressor having ahigher processing ability for performing data compression on one sameimage repetitively until the predetermined amount of data is obtained.

Having described the three embodiments including a compressor that canadjust the amount of data with a scale factor, a compressor currentlyexists that adjusts an amount of data with a given image qualityparameter, without showing the scale factor itself. Such a compressorhas a relationship, for example:[Image Quality Parameter]={(65536−[Scale Factor])/65536}·100  (Expression 14)(where 1≦[Scale Factor]≦65535; and 0≦[Image Quality Parameter]≦100).

Therefore, the invention is applicable to a compressor in which theparameter for adjusting an amount of data is not the scale factoritself. The invention may further fully support a compressor having acomplicated relationship between the image quality parameter and thescale factor by dividing the scale factor into multiple intervals anddefining the relationship between the amount of compressed data and thescale factor or by correcting the value of the scale factor with theconversion array, as described above. Therefore, the invention is alsoapplicable to a compressor that adjusts an amount of data with a givenimage quality parameter.

It should be understood by those skilled in the art that variousmodifications, combinations, sub-combinations and alterations may occurdepending on design requirements and other factors insofar as they arewithin the scope of the appended claims or the equivalents thereof.

What is claimed is:
 1. A method for compressing image data, comprising:quantizing image data corresponding to at least one digital image, thequantizing comprising: dividing the image data into a plurality of datablocks, the data blocks comprising corresponding numbers of pixels;applying orthogonal transformations to the data blocks, the orthogonaltransformations generating corresponding conversion coefficients for thepixels of the data blocks; computing scaled threshold values associatedwith a quantization matrix, based on at least one scale factor and acorresponding scaling interval; and calculating quotients of theconversion coefficients and corresponding ones of the scaled thresholdvalues to generate quantized image data; and compressing the quantizeddata in accordance with a variable-length encoding scheme, wherein: theat least one scale factor and the scaling interval enable the compresseddata to fit within a predetermined range of a target amount of data; andthe computing comprises: partitioning the scaling interval into aplurality of sub-intervals; calculating estimated values of the at leastone scale factor for the sub-intervals, based on a relationship betweenthe at least one scale factor and an amount of the compressed data; andcomputing the scaled threshold values, based on at least the estimatedscale factor values.
 2. A method for compressing image data, comprising:quantizing image data corresponding to at least one digital image, thequantizing comprising: dividing the image data into a plurality of datablocks, the data blocks comprising corresponding numbers of pixels;applying orthogonal transformations to the data blocks, the orthogonaltransformations generating corresponding conversion coefficients for thepixels of the data blocks; computing scaled threshold values associatedwith a quantization matrix; and calculating quotients of the conversioncoefficients and corresponding ones of the scaled threshold values togenerate quantized image data; and compressing the quantized data inaccordance with a variable-length encoding scheme, wherein: the scaledthreshold values enable compressed data to fit within a predeterminedrange of a target amount of data; and the computing comprises:determining an initial scale factor for the threshold values, based onthe target data amount; calculating a corrected scale factor based onthe initial scale factor and a correction coefficient; and computing thescaled threshold values, based on at least corrected scale factor.
 3. Amethod for compressing image data, comprising: quantizing image datacorresponding to at least one digital image, the quantizing comprising:dividing the image data into a plurality of data blocks, the data blockscomprising corresponding numbers of pixels; applying orthogonaltransform on each block transformations to the data blocks, theorthogonal transformations generating corresponding conversioncoefficients for the pixels of the data blocks; computing scaledthreshold values associated with a quantization matrix, based on a firstscale factor; and calculating quotients of the conversion coefficientsand corresponding ones of the scaled threshold values to generatequantized image data; compressing the quantized data in accordance witha variable-length encoding scheme; determining whether an amount of thecompressed data falls within a target amount of data; and determining,when the compressed data amount fails to fall within the target amount,a second scale factor for the threshold values of the quantizationmatrix, the determining comprising: computing a provisional scale factorfor the threshold values of the quantization matrix, based on the targetamount of data; and calculating the second scale factor based, on anapplication of an attenuation factor to at least one of the provisionalscale factor or the first scale factor, wherein the second scale factorenables the amount of compressed data to fit within the target amount ofdata.
 4. An image data compressing apparatus comprising: a quantizationsection for quantizing image data corresponding to at least one digitalimage, the quantization section being configured to: divide the imagedata into a plurality of data blocks, the data blocks comprisingcorresponding numbers of pixels; applying orthogonal transformations tothe data blocks, the orthogonal transformations generating correspondingconversion coefficients for the pixels of the data blocks; computingscaled threshold values associated with a quantization matrix, based onat least one scale factor and a corresponding scaling interval; andcalculating quotients of the conversion coefficients and correspondingones of the scaled threshold values to generate quantized image data;and an image data compressing section for compressing the quantizeddata, wherein: the at least one scale factor and the scaling intervalenable the compressed data to fit within a predetermined range of atarget amount of data; and the quantization section is furtherconfigured to: partition the scaling interval into a plurality ofsub-intervals; calculate estimated values of the at least one scalefactor for the sub-intervals, based on a relationship between the atleast one scale factor and an amount of the compressed data; and computethe scaled threshold values, based on at least the estimated scalefactor values.
 5. An image data compressing apparatus, comprising: aquantization section for quantizing image data corresponding to at leastone digital image, the quantization section being configured to: dividethe image data into a plurality of data blocks, the data blockscomprising corresponding numbers of pixels; apply orthogonaltransformations to the data blocks, the orthogonal transformationsgenerating corresponding conversion coefficients for the pixels of thedata blocks; compute scaled threshold values associated with aquantization matrix; and calculate quotients of the conversioncoefficients and corresponding ones of the scaled threshold values togenerate quantized image data; and an image data compressing section forcompressing the quantized data, wherein: the scaled threshold valuesenable compressed data to fit within a predetermined range of a targetamount of data; and the quantization section is further configured to:determine an initial scale factor for the threshold values, based on thetarget data amount; calculate a corrected scale factor based on theinitial scale factor and a correction coefficient; and compute thescaled threshold values, based on at least corrected scale factor.
 6. Animage data compressing apparatus comprising: a quantization section forquantizing image data corresponding to at least one digital image, thequantization section being configured to: divide the image data into aplurality of data blocks, the data blocks comprising correspondingnumbers of pixels; apply orthogonal transformations to the data blocks,the orthogonal transformations generating corresponding conversioncoefficients for the pixels of the data blocks; compute scaled thresholdvalues associated with a quantization matrix, based on a first scalefactor; and calculate quotients of the conversion coefficients andcorresponding ones of the scaled threshold values to generate quantizedimage data; an image data compressing section for compressing thequantized data in accordance with a variable-length encoding scheme; anda determination section for: determining whether an amount of thecompressed data falls within a target amount of data; computing aprovisional scale factor for the threshold values of the quantizationmatrix, based on the target amount of data, when the compressed dataamount fails to fall within the target data amount; and determining thesecond scale factor for the threshold value of the quantization matrix,based on an application of an attenuation factor to at least one of theprovisional scale factor or the first scale factor, wherein the secondscale factor enables the amount of compressed data to fit within thetarget data amount.
 7. The method of claim 1, wherein the at least onescale factor comprises a positive real number.
 8. The method of claim 1,wherein: the quantization matrix comprises a plurality of initialthreshold values; and computing the scaled threshold values comprises:computing products of the at least one scale factor and correspondingones of the initial threshold values.
 9. The method of claim 2, whereinthe at least one scale factor comprises a positive real number.
 10. Themethod of claim 2, wherein the correction coefficient comprises an errorassociated with the initial scale factor.
 11. The method of claim 3,wherein the at least one scale factor comprises a positive real number.12. The method of claim 3, wherein determining the second scale factorcomprises applying a smoothing operation to at least one of the firstscale factor or the provisional scale factor, based on the attenuationfactor.